﻿using System;
using System.Text;
using System.Linq;
using System.Data;
using System.Data.Entity;
using System.Collections.Generic;

using PowerSys.Model;
using PowerSys.DataAccess;
using PowerSys.SystemFramework;

namespace PowerSys.BusinessLogic
{
    public class XUser
    {
        public int Login(string name)
        {
           return new XUserDA().BatchDelete(name);
        }

        public void Add(X_User x_User)
        {
            x_User.ID = XSerialDA.GetNew("XUID");
            new XUserDA().Add(x_User);
        }

        public void Delete(string id)
        {
            X_User x_User = new X_User { ID = id };
            new XUserDA().Delete(x_User);
        }

        public void Update(X_User x_User)
        {
            new XUserDA().Update(x_User);
        }
    }
}
